package com.mind.system.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.mind.common.annotation.Excel;
import com.mind.common.utils.StringUtils;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * 智审配置对象 aj_review_config
 * 
 * @author today
 * @date 2024-09-03
 */
@Data
public class AjReviewConfig
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 规则明细id */
    @Excel(name = "规则明细id")
    private Long ruleDetailId;

    /** 规则明细名称 */
    @Excel(name = "规则明细名称")
    private String ruleDetailName;

    /** 业务小类 */
    @Excel(name = "业务小类")
    private String businessCate;



    /** 业务小类名称 */
    @Excel(name = "业务小类名称")
    private String businessCateName;

    /** 单据类型名称 */
    @Excel(name = "单据类型名称")
    private String ticketTypeName;

    /** 处理条件(1:通过 2:不通过) */
    @Excel(name = "处理条件")
    private String chkStatus;

    /** 处理结果(1:自动通过 2:转人工 3:退回影像4:退回发起人) */
    @Excel(name = "处理结果")
    private String chkResult;

    /** 创建人 */
    @Excel(name = "创建人")
    private String addUser;

    protected Date createTime;	// 创建日期
    protected Date updateTime;	// 更新日期

    @ExcelIgnore
    private String businessCates;

    private List<String> businessCateList;

    private List<String> getBusinessCateList() {
        if(StringUtils.isEmpty(businessCates)){
            return null;
        }else{
            return Arrays.asList(businessCates.split(","));
        }
    }
    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setRuleDetailId(Long ruleDetailId) 
    {
        this.ruleDetailId = ruleDetailId;
    }

    public Long getRuleDetailId() 
    {
        return ruleDetailId;
    }
    public void setRuleDetailName(String ruleDetailName) 
    {
        this.ruleDetailName = ruleDetailName;
    }

    public String getRuleDetailName() 
    {
        return ruleDetailName;
    }
    public void setBusinessCate(String businessCate) 
    {
        this.businessCate = businessCate;
    }

    public String getBusinessCate() 
    {
        return businessCate;
    }
    public void setBusinessCateName(String businessCateName) 
    {
        this.businessCateName = businessCateName;
    }

    public String getBusinessCateName() 
    {
        return businessCateName;
    }
    public void setTicketTypeName(String ticketTypeName) 
    {
        this.ticketTypeName = ticketTypeName;
    }

    public String getTicketTypeName() 
    {
        return ticketTypeName;
    }
    public void setChkStatus(String chkStatus) 
    {
        this.chkStatus = chkStatus;
    }

    public String getChkStatus() 
    {
        return chkStatus;
    }
    public void setChkResult(String chkResult) 
    {
        this.chkResult = chkResult;
    }

    public String getChkResult() 
    {
        return chkResult;
    }
    public void setAddUser(String addUser) 
    {
        this.addUser = addUser;
    }

    public String getAddUser() 
    {
        return addUser;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("ruleDetailId", getRuleDetailId())
            .append("ruleDetailName", getRuleDetailName())
            .append("businessCate", getBusinessCate())
            .append("businessCateName", getBusinessCateName())
            .append("ticketTypeName", getTicketTypeName())
            .append("chkStatus", getChkStatus())
            .append("chkResult", getChkResult())
            .append("addUser", getAddUser())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
